package com.bank.manage.service.Impl;

import com.bank.manage.model.BankOptConsumeRecords;
import com.bank.manage.mapper.BankOptConsumeRecordsMapper;
import com.bank.manage.model.BankOptRechargeRecords;
import com.bank.manage.model.param.BankQueryParam;
import com.bank.manage.service.BankOptConsumeRecordsService;
import com.mybatisflex.core.query.QueryWrapper;
import com.mybatisflex.spring.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author grl
 * @since 2024-04-01
 */
@Service
public class BankOptConsumeRecordsServiceImpl extends ServiceImpl<BankOptConsumeRecordsMapper, BankOptConsumeRecords> implements BankOptConsumeRecordsService {

    @Override
    public Boolean recordExistQuery(BankQueryParam param) {
        QueryWrapper wrapper = QueryWrapper.create().eq(BankOptConsumeRecords::getRequestId, param.getRequestId())
                .eq(BankOptConsumeRecords::getSpecificValue, param.getSpecificValue()).from(BankOptConsumeRecords.class);
        return exists(wrapper);
    }
}
